﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace ClearbrookStudios.Controls
{
    public static class EnumHelper
    {
        public static int Count(Type enumType)
        {
            FieldInfo[] fieldInfo = enumType.GetFields(BindingFlags.Static | BindingFlags.Public);
            var array = fieldInfo.Select(f => f.Name).ToArray();
            return array.Count<string>();
        }
    }
}
